package com.liam.captchademo.controller;

import jakarta.annotation.PostConstruct;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/log")
@RestController
public class LogController {
    private static Logger logger = LoggerFactory.getLogger(LogController.class);

    @PostConstruct
    public void print() {
        System.out.println("打印日志");
        logger.info("打印日志");
        logger.error("打印error日志");
    }
}
